﻿/**
  KCAKCAK   CAKCAKC   AK      CA
 AK        KC     CA  AK    AK
CA         KC     CA  AK  KC
CA         KCAKCAKCA  AKCA
CA         KC     CA  AK  KC
 AK        KC     CA  AK    AK
  KCAKCAK  KC     CA  AK      CA

_________________________________________________________________
 China ataca Kamchatka - copyright 2007(c) Ruben Sainz de la Maza
 
	@class: 	Lobby
	@vertion: 	0.1
	@date:		27/02/08
				
	@language: 	ActionScript 3.0
	@author:	Ruben Sainz de la Maza
			
**/


package com.conelmate.cak.screens
{
	import com.conelmate.util.Trace;
	import com.conelmate.nc.Connect;

	
	import flash.display.Sprite;

	public class LobbyRoom extends Trace
	{	
				private var 	_mcLine;		//attach library screens/lobby/mcLobbyRoom
				
				private var 	_container	:Sprite;
				private var 	_y			:uint;
				private var 	_roomName	:String;
				private var 	_background	:Boolean;
				private var 	_users		:uint;
				private var 	_maxUsers	:uint;
				private var 	_status		:String
				private var 	_type		:String;
		
		
//_________________________________________________________________________________ Constructor		
		public function LobbyRoom()
		{
			_isTrace = true;
			mTrace("#LobbyRoom# constructor");
		}


//_________________________________________________________________________________ Public Methods

		
		/**
		 * inicializar
		 */		
//		public function init(p_container, p_y:Number, p_roomName:String, p_background, p_users, p_maxUsers, p_status, p_type):void
		public function init():void
		{
			mTrace("#LobbyRoom# init");
/*
			trace(p_container)
			trace(p_y)
			trace(p_roomName)
			trace(p_background)
			trace(p_users)
			trace(p_maxUsers)
			trace(p_status)
			trace(p_type)
			trace("---------")
*/

		//	_y = p_y || _y;
		//	_roomName = p_roomName || _roomName;
		
			_mcLobbyRoom = new mcLobbyRoom();	//attach library screens/lobby/mcLobbyRoom
			_mcLobbyRoom.gameName.text = _roomName;
			_mcLobbyRoom.players.text = _users + "/" + _maxUsers;
			_mcLobbyRoom.status.text = _status;
			_mcLobbyRoom.type.text = _type;
			_mcLobbyRoom.barra2.visible = _background;
	
			_mcLobbyRoom.colors.NEGRO.visible = false;
			_mcLobbyRoom.colors.AZUL.visible = false;
			_mcLobbyRoom.colors.ROJO.visible = false;
			_mcLobbyRoom.colors.BLANCO.visible = false;
			_mcLobbyRoom.colors.VERDE.visible = false;
			_mcLobbyRoom.colors.AMARILLO.visible = false;
			
			_mcLobbyRoom.y = _y;
			
			_container.addChild(_mcLobbyRoom);
		}
		
		
		/**
		 * destruir objetos y variables
		 */	
		public function destroy():void
		{
			mTrace("#LobbyRoom# destroy");
		//	Lobby._INSTANCE = null;
		}

		
		
//_________________________________________________________________________________ Private Methods
		public function set container	(p:Sprite)	{ _container = p; }
		public function set posy		(p:uint) 	{ _y = p; }
		public function set roomName	(p:String) 	{ _roomName = p; }
		public function set background	(p:Boolean) { _background = p; }
		public function set users		(p:uint) 	{ _users = p; }
		public function set maxUsers	(p:uint) 	{ _maxUsers = p; }
		public function set status		(p:String)	{ _status = p; }
		public function set type		(p:String)	{ _type = p; }

	}
}

